<div class="layui-fluid">
    <div class="layui-breadcrumb jy-breadcrumb">

    </div>
    <div class="layui-card newSku">
        <div class="layui-form layui-card-header layuiadmin-card-header-auto" lay-filter="LAY-list-form">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">SKU</label>
                    <div class="layui-input-block">
                        <input type="text" name="sku" placeholder="多个用空格或逗号隔开" autocomplete="on" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">SPU</label>
                    <div class="layui-input-block">
                        <input type="text" name="spu" placeholder="多个用空格或逗号隔开" autocomplete="off" class="layui-input">
                    </div>
                </div>
                <div class="layui-inline ">
                    <label class="layui-form-label">录入日期</label>
                    <div class="layui-input-block layui-jy-datetime">
                        <input type="text" class="layui-input" id="date" name="creation_time" placeholder="">
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">销售状态</label>
                    <div class="layui-input-block">
                        <select name="sales_status" type="select" xm-select="select1">
                        </select>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">SKU状态</label>
                    <div class="layui-input-block">
                        <select name="status" >
                            <option value="">请选择</option>
                            <option value="1">启用</option>
                            <option value="0">禁用</option>
                        </select>
                    </div>
                </div>

                <div class="layui-inline">
                    <label class="layui-form-label"></label>
                    <button class="layui-btn search" lay-submit lay-filter="LAY-list-search">查询</button>
                    <button type="reset" class="reset layui-btn layui-btn-primary">重置</button>
                </div>
            </div>
        </div>

        <div class="layui-card-body">
            <div class="layui-form" lay-filter="batchOp-form">
                <div class="layui-form-item">
                    <div class="layui-inline">
                        <select lay-filter="batchOp" >
                            <option value="0" selected>批量操作</option>
                            <option value="1">批量录入</option>
                            <option value="2">批量修改信息</option>
                            <option value="4">批量修改销售状态</option>
                            <option value="5">批量启用禁用状态</option>
                            <option value="3">列表导出</option>
                        </select>
                    </div>
                    <div class="layui-inline" id="updatePrice"><button class="layui-btn ">上传修改参考价</button></div>

                </div>

            </div>

            <table id="LAY-list" lay-filter="LAY-list"></table>
            <!-- 行内工具 -->
            <script type="text/html" id="LAY-list-toolbar">
                {{# if(d.updatePrice==0){ }}
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="edit" href="javascript:;">编辑</a>
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="statusSale" href="javascript:;">状态</a>
                {{# }else{ }}
                <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editPrice" href="javascript:;">修改参考价</a>
                {{# } }}
            </script>
        </div>
    </div>
</div>
<script type="text/html" id="subTableHtml">
    <table   class="subTable diyTable">
        <tbody>
        <tr>
            <td>开发编码</td>
            <td>{{d.develop_code||''}}</td>
            <td>开发人员</td>
            <td>{{d.developer_name||''}}</td>
            <td>分类信息</td>
            <td>{{d.cate_name_path||''}}</td>
            <td>EAN码</td>
            <td>{{d.eancode||''}}</td>
        </tr>
        <tr>
            <td>开发日期</td>
            <td>{{d.develop_time||''}}</td>
            <td>业务线</td>
            <td>{{d.serviceline_str||''}}</td>
            <td>自带包装重量</td>
            <td>{{d.asweight||0}}g</td>
            <td>打包后重量</td>
            <td>{{d.baleweight||0}}g</td>
        </tr>

        <tr>
            <td>自带包装尺寸</td>
            <td>{{d.aslength||0}}*{{d.aswide||0}}*{{d.ashight||0}}</td>
            <td>打包后尺寸</td>
            <td>{{d.balelength||0}}*{{d.balewide||0}}*{{d.balehight||0}}</td>
            <td>主体尺寸</td>
            <td>{{d.length_temp||0}}*{{d.wide||0}}*{{d.hight||0}}</td>
            <td>容量体积</td>
            <td>{{d.bulk||''}}{{d.bulk_unit||''}}</td>

        </tr>

        <tr>
            <td>开发链接</td>
            <td><a class="blue" href="{{d.develop_link||''}}" target="_blank">点击跳转</a></td>
            <td>老erp id</td>
            <td>{{d.old_erp_id||''}}</td>
            <td>参考价</td>
            <td>{{d.reference_price||''}}</td>
            <td>上架时间</td>
            <td>{{d.uptime||''}}</td>
        </tr>
        <tr>
            <td>录入时间</td>
            <td>{{d.creation_time||''}}</td>
            <td>录入人</td>
            <td>{{d.operator||''}}</td>
            <td>修改时间</td>
            <td>{{d.modification_time||''}}</td>
            <td>制式</td>
            <td>{{d.standard||''}}</td>
        </tr>
        <tr>
            <td>销售数量单位</td>
            <td>{{d.quantity||''}}{{d.quantity_unit||''}}</td>
            <td>质检标准</td>
            <td colspan="5">{{d.qc_standard||''}}</td>
        </tr>
        </tbody>
    </table>
</script>
<script type="text/html" id="editSku">
    <div class="layui-form layui-card-header layuiadmin-card-header-auto editSku-form" lay-filter="editSku-form">

        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">SKU</label>
                <div class="layui-input-block ">
                    <input type="text"  name="sku" lay-verify="required" value="" placeholder="" autocomplete="off" class="layui-input gray"
                           readonly>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">SPU</label>
                <div class="layui-input-block">
                    <input type="text" name="spu"  lay-verify="required|int" value="" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">sku名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name"  lay-verify="required"  placeholder="" autocomplete="off" class="layui-input" >
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">开发编码</label>
                <div class="layui-input-block">
                    <input type="text" name="develop_code"   lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">开发日期</label>
                <div class="layui-input-block">
                    <input type="text" name="develop_time"  lay-verify="required" class="layui-input" id="develop_time">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">开发链接</label>
                <div class="layui-input-block">
                    <input type="text" name="develop_link"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">重量</label>
                <div class="layui-input-block" id="weight">
                    <input type="text" name="asweight"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-yh">参考价</label>
                <div class="layui-input-block">
                    <input type="text" id="reference_price" name="reference_price"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input gray"  readonly>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-yh">EAN码</label>
                <div class="layui-input-block">
                    <input type="text" name="eancode"    placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">制式</label>
                <div class="layui-input-block">
                    <select name="standard" xm-select="standard"  lay-verify="required" xm-select-radio=""></select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">开发员</label>
                <div class="layui-input-block">
                    <select name="developer"  lay-verify="required" xm-select="developer" xm-select-search="/index/User/getUserByName"
                            xm-select-radio="">
                    </select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">老erp id</label>
                <div class="layui-input-block">
                    <input type="text" name="old_erp_id"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">业务线</label>
                <div class="layui-input-block">
                    <select name="serviceline"  lay-verify="required" xm-select="serviceline" xm-select-radio=""
                            lay-verify="required"></select>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">sku状态</label>
                <div class="layui-input-block">
                    <select name="status" xm-select="status"  lay-verify="required" xm-select-radio="" lay-verify="required"></select>
                </div>
            </div>


            <div class="layui-inline">
                <label class="layui-form-label layui-form-label-required">质检标准</label>
                <div class="layui-input-block" style="width: 400px">
                    <input type="text" name="qc_standard"  lay-verify="required" placeholder="" autocomplete="off" class="layui-input">
                </div>
            </div>

            <div class="layui-inline" style="width: 550px">
                <label class="layui-form-label layui-form-label-required">分类</label>
                <div class="layui-input-block category_id" >
                    <cascader id="cateId"></cascader>
                  <!--  <select name="category_id" xm-select="cate" xm-select-radio="" xm-select-search="/index/Newsku/getCate" lay-verify="required"></select>-->
                </div>
            </div>
            <div class="layui-jy-center layui-item">
                <button class=" layui-btn layui-btn-primary" onclick="layer.closeAll();">取消</button>
                <button class="layui-btn " lay-submit lay-filter="editSkuSubmit">保存</button>
            </div>
        </div>
    </div>
</script>
<script type="text/html" id="editStatus">
    <div class="layui-form layui-card-header layuiadmin-card-header-auto editStatus-form" lay-filter="editStatus-form">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">SKU</label>
            <div class="layui-input-block">
                <input type="text" name="sku" placeholder="" class="layui-input" readonly>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-inline">
                <select name="sales_status" type="select" xm-select="sales_status" xm-select-radio="" lay-verify="required">
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">状态备注</label>
            <div class="layui-input-block">
                <input type="text" name="remarks" class="layui-input">
            </div>
        </div>
    </div>
        <div class="layui-jy-center layui-item">
            <button class="layui-btn " lay-submit lay-filter="editSkuStatusSubmit">保存</button>
        </div>
    </div>
</script>

<script type="text/html" id="editPrice">
    <div class="layui-form layui-card-header layuiadmin-card-header-auto editStatus-form" lay-filter="editStatus-form">
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">SKU</label>
                <div class="layui-input-block">
                    <input type="text" name="sku" placeholder="" class="layui-input" readonly>
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-inline">
                <label class="layui-form-label">参考价</label>
                <div class="layui-input-block">
                    <input type="text" name="reference_price" class="layui-input">
                </div>
            </div>
        </div>
        <div class="layui-jy-center layui-item">
            <button class="layui-btn " lay-submit lay-filter="editSkuPriceSubmit">保存</button>
        </div>
    </div>
</script>

<style>
    #weight:after {
        content: 'g';
        position: absolute;
        top: 0px;
        right: 10px;
    }
    .category_id .xm-select-title{
        width: 500px;
    }
    .layui-layer-content  .layui-card-header.layuiadmin-card-header-auto{
        background: #fff;
    }
    #updatePrice{
        display: none;
    }
</style>
<script>
    layui.use(['admin', 'table', 'form', 'toolJ', 'formSelects', 'laydate', 'laytpl','upload','ajaxCascader'], function () {
        var $ = layui.$
            , admin = layui.admin
            , view = layui.view
            , table = layui.table
            , laytpl = layui.laytpl
            , cascader = layui.ajaxCascader
            , upload = layui.upload
            , laydate = layui.laydate
            , formSelects = layui.formSelects
            , toolJ = layui.toolJ
            , form = layui.form;
        //日期
        laydate.render({
            elem: '#date'
            , type: 'datetime'
            , range: true
        });
        form.render(null);

        var _cate='';//分类数据


        //批量操作
        form.on('select(batchOp)', function(data){
            switch (data.value) {
                case '1':
                    //批量录入
                    toolJ.upload('/index/Newsku/uploadAdd', '/attachment/importcvs/newsku.csv');
                    break;
                case '2':
                    //批量修改
                    toolJ.upload('/index/Newsku/uploadUpdate', '/attachment/importcvs/newskuupdate.csv');
                    break;
                    case '4':
                    //批量修改销售状态
                    toolJ.upload('/index/Newsku/uploadUpdateSaleStatus', '/attachment/importcvs/updateSaleStatus.csv');
                    break;
                case '5':
                    //批量启用禁用状态
                    toolJ.upload('/index/Newsku/uploadUpdateStatus', '/attachment/importcvs/updateStatus.csv');
                    break;
                case '3':
                    //列表导出
                    //获取搜索条件
                    var data = form.val("LAY-list-form");
                    var ok=0;
                    for(var i in data){
                        if(data[i]){
                            ok=1;
                        }
                    }
                    if(ok==0){
                        layer.alert('请填写搜索条件再操作!');
                        break;
                    }
                    toolJ.ajax({"data": data, 'url': '/index/Newsku/exportNewSku'});
                    break;
            }
            layui.$("div[lay-filter='batchOp-form'] dd[lay-value=0]").remove();
            //data.elem.value=0;
            //form.render(null, 'batchOp-form');
        });
        layui.$("div[lay-filter='batchOp-form'] dd[lay-value=0]").remove();
        //多选
        formSelects.render();
        toolJ.formSelectsArr(layui.data(layui.setter.tableName).skuSaleStatus, 'select1');
        table.render({
            elem: '#LAY-list'
            , url: '/index/Newsku/index'
            , cellMinWidth: 80
            , cols: [[
                {
                    field: '', title: '<i   class="layui-icon layui-colla-icon layui-icon-right collapseAll pointer"></i>',
                    event: 'collapse',
                    width: 50, align: 'center', templet: function (d) {
                        return '<i style="" class="layui-icon layui-colla-icon layui-icon-right pointer"></i>';
                    }
                }
                , {field: 'sku', title: 'SKU',width:120}
                , {field: 'spu', title: 'SPU',width:100}
                , {field: 'name', title: 'sku名称'}
                , {field: 'modification_operator', title: '最后操作人',width:100}
                , {field: 'status_str', title: 'sku状态',width:80}
                , {field: 'sales_status_str', title: '销售状态',width:120}
                , {field: 'remarks', title: '备注',width:130}
                , {title: '操作', align: 'center', fixed: 'right', width:120,toolbar: '#LAY-list-toolbar'}
            ]]
            , page: true
            , limit: 15
            , text: {none: '暂无相关数据!'}
        });
        //明细全部展开|折叠
        $('.newSku').on('click','.collapseAll',function () {
            $('.newSku .layui-table-body tbody').eq(0).children().each(function (i) {
                if($(this).data('data-collapse')!=1){
                    var getTpl = subTableHtml.innerHTML;
                    var that=$(this);
                    laytpl(getTpl).render(layui.table.cache['LAY-list'][$(this).data('index')], function (html) {
                        var trObj = that; //当前行
                        var accordion = false; //开启手风琴，那么在进行折叠操作时，始终只会展现当前展开的表格。
                        var content =html;
                        //表格行折叠方法
                        collapseTable({
                            elem: trObj,
                            accordion: accordion,
                            content: content,
                            success: function (trObjChildren, index) { //成功回调函数
                                //trObjChildren 展开tr层DOM
                                //index 当前层索引
                                //table.init('subTable');
                            }
                        });
                    });
                }
            })
            //展开|折叠箭头图标
            $(this).toggleClass("layui-icon-right layui-icon-down");
        })
        //监听行内操作
        table.on('tool(LAY-list)', function (obj) {
            var data = obj.data;

            switch (obj.event) {
                case 'collapse':
                    var getTpl = subTableHtml.innerHTML;
                    var that=$(this);
                    laytpl(getTpl).render(data, function (html) {
                        var trObj =that.parent('tr'); //当前行
                        var accordion = false; //开启手风琴，那么在进行折叠操作时，始终只会展现当前展开的表格。
                        var content = html;
                        //表格行折叠方法
                        collapseTable({
                            elem: trObj,
                            accordion: accordion,
                            content: content,
                            success: function (trObjChildren, index) { //成功回调函数
                                //trObjChildren 展开tr层DOM
                                //index 当前层索引
                                //  table.init('subTable');
                            }
                        });
                    });

                    break;
                case 'edit':
                    layer.open({
                        type: 5,
                        title: '编辑资料',
                        shade: [0.5, '#000'],
                        offset: 'auto',
                        area: ["80%"],
                        shadeClose: true,
                        closeBtn: 1,
                        anim: 2,
                        content: $('#editSku').html(),
                        cancel: function () {

                        }
                    });
                    toolJ.assign(data, '.editSku-form');
                    form.render(null, 'editSku-form');
                    //默认分类
/*                    formSelects.data('cate', 'local', {
                        arr: [
                            {"name": data.cate_name_path, "value": data.category_id},
                        ]
                    });
                    formSelects.value('cate', [data.category_id]);*/


                    //默认制式
                    formSelects.data('standard', 'local', {
                        arr: [
                            {"name": 'CN plug', "value": 'CN plug'},
                            {"name": 'US plug', "value": 'US plug'},
                            {"name": 'UK plug', "value": 'UK plug'},
                            {"name": 'AU plug', "value": 'AU plug'},
                            {"name": 'EU plug', "value": 'EU plug'},
                            {"name": 'Null', "value": 'Null'},
                            {"name": 'JP plug', "value": 'JP plug'},
                            {"name": 'BRA plug', "value": 'BRA plug'},
                            {"name": 'IL plug', "value": 'IL plug'},
                            {"name": 'IT plug', "value": 'IT plug'},
                        ]
                    });
                    formSelects.value('standard', [data.standard]);

                    //开发员
                    formSelects.data('developer', 'local', {
                        arr: [
                            {"name": data.developer_name, "value": data.developer},
                        ]
                    });
                    formSelects.value('developer', [data.developer]);
                    laydate.render({
                        elem: '#develop_time'
                        , value: data.develop_time&&data.develop_time!='0000-00-00' ? data.develop_time : ''
                    });
                    toolJ.formSelectsArr(layui.data(layui.setter.tableName).skuStatus, 'status', [data.status]);
                    toolJ.formSelectsArr(layui.data(layui.setter.tableName).serviceLine, 'serviceline', [data.serviceline]);

                    //分类获取
                    var cid=[];
                    if(data.cate_id_path){
                        cid=data.cate_id_path.split(',');
                    }
                    if(!_cate){
                        toolJ.ajax({"data": data.field,"jy-search":1,'url': '/index/Newsku/getCate'},function (res) {
                            _cate=res.data;
                            cascader.load({
                                elem: '#cateId',
                                width: 400, //input框宽度
                                // placeholder, // input框提示词
                                prop: {
                                    value: 'cate_id',
                                    label: 'cate_name_cn'
                                    //children:'children' // 子集的名称定义
                                }
                                , clear: true                               // 是否显示清空功能
                                ,clicklast:true			      //【可选】点击最后一级才选择数据
                                , data: _cate
                                , chooseData:cid// 回显数据
                            });
                        },2);
                    }else{
                        cascader.load({
                            elem: '#cateId',
                            width: 400, //input框宽度
                            // placeholder, // input框提示词
                            prop: {
                                value: 'cate_id',
                                label: 'cate_name_cn'
                                //children:'children' // 子集的名称定义
                            }
                            , clear: true                               // 是否显示清空功能
                            ,clicklast:true			      //【可选】点击最后一级才选择数据
                            , data: _cate
                            , chooseData:cid // 回显数据
                        });
                    }

                    break;
                case 'statusSale':
                    layer.open({
                        type: 5,
                        title: 'SKU销售状态',
                        shade: [0.5, '#000'],
                        offset: 'auto',
                        //area: ["70%", "70%"],
                        shadeClose: true,
                        closeBtn: 1,
                        anim: 2,
                        content: $('#editStatus').html(),
                        cancel: function () {
                        }
                    });
                    toolJ.assign(data, '.editStatus-form');
                    form.render(null, 'editStatus-form');
                    var ss=layui.data(layui.setter.tableName).skuSaleStatus;
                    delete ss[3];
                    toolJ.formSelectsArr(ss, 'sales_status', [data.sales_status]);
                    break;

                case 'editPrice':
                    layer.open({
                        type: 5,
                        title: 'SKU参考价',
                        shade: [0.5, '#000'],
                        offset: 'auto',
                        //area: ["70%", "70%"],
                        shadeClose: true,
                        closeBtn: 1,
                        anim: 2,
                        content: $('#editPrice').html(),
                        cancel: function () {
                        }
                    });
                    toolJ.assign(data, '.editStatus-form');
                    form.render(null, 'editStatus-form');
                    var ss=layui.data(layui.setter.tableName).skuSaleStatus;
                    delete ss[3];
                    toolJ.formSelectsArr(ss, 'sales_status', [data.sales_status]);
                    break;
            }
        });

        function collapseTable(options) {
            var trObj = options.elem;
            if (!trObj) return;
            var accordion = options.accordion,
                success = options.success,
                content = options.content || '';
            var tableView = trObj.parents('.layui-table-view'); //当前表格视图
            var id = tableView.attr('lay-id'); //当前表格标识
            var index = trObj.data('index'); //当前行索引

            var colspan = trObj.find('td').length; //获取合并长度
            var trObjChildren = trObj.next(); //展开行Dom
            var indexChildren = id + '-' + index + '-children'; //展开行索引

            //不存在就创建展开行
            if (trObjChildren.data('index') != indexChildren) {
                //装载HTML元素
                var tr = '<tr data-index="' + indexChildren + '"><td colspan="' + colspan + '"><div class="" style="height: auto;">' + content + '</div></td></tr>';
                trObjChildren = trObj.after(tr).next().hide(); //隐藏展开行
            }
            //展开|折叠箭头图标
            trObj.find('td[lay-event="collapse"] i.layui-colla-icon').toggleClass("layui-icon-right layui-icon-down");
            //显示|隐藏展开行
            trObjChildren.toggle();
            //开启手风琴折叠和折叠箭头
            if (accordion) {
                trObj.siblings().find('td[lay-event="collapse"] i.layui-colla-icon').removeClass("layui-icon-down").addClass("layui-icon-right");
                trObjChildren.siblings('[data-index$="-children"]').hide(); //展开
            }
            success(trObjChildren, indexChildren); //回调函数
        }

        //监听提交sku编辑
        form.on('submit(editSkuSubmit)', function (data) {
            var field=data.field;
            field.category_id=cascader.getChooseData('#cateId');
            if(field.category_id.length){
                field.category_id=field.category_id[field.category_id.length-1];
            }else{
                field.category_id='';
            }
            toolJ.ajax({"data": data.field, 'url': '/index/Newsku/editSku'});
        })
        //监听状态编辑
        form.on('submit(editSkuStatusSubmit)', function (data) {
            toolJ.ajax({"data": data.field, 'url': '/index/Newsku/editSkuSaleStatus'});
        })
        form.on('submit(editSkuPriceSubmit)', function (data) {
            toolJ.ajax({"data": data.field, 'url': '/index/Newsku/editSkuPrice'});
        })

        var menu4=layui.data(layui.setter.tableName).menu4;
        var updatePrice=0;
        if(menu4){
            if(typeof menu4['Newsku/uploadUpdatePrice']!="undefined"){
                //$('#updatePrice').show();
                $("#updatePrice").css("display","inline-block");
                updatePrice=1;
            }else{
                $('#updatePrice').hide();
                updatePrice=0;
            }
            //批量更新参考价
            $('#updatePrice').unbind('click').click(
                function () {
                    toolJ.upload('/index/Newsku/uploadUpdatePrice', '/attachment/importcvs/updatePrice.csv');
                }
            )
        }



    });
</script>